// ActionScript file
import mx.controls.Alert;

import org.flexlancer.Logger.Logger;
import org.flexlancer.events.CustomEvent;

private function Login_OnClicked():void{
	try{
		//Users.AddUser("kcj","1234");
		//var custObj:Object = new Object();
		//var vehObj:Object = new Object();
	
	//	Customers.AddCustomer("Khurram", "Guest" , null , null);
		/* var dt:Date= new Date();
 		 Alert.show(dt.toString(),"To String");
 		Alert.show(dt.toDateString(),"To Date String");
 		Alert.show(dt.toLocaleDateString(),"To local date string");
 		Alert.show(dt.toLocaleString(),"to local string");
 		Alert.show(dt.toLocaleTimeString(),"To local time string");
 		Alert.show(dt.toTimeString(),"to time string");
 		Alert.show(dt.toUTCString(),"to UTC string"); */
 		
 		// Alert.show(dt.valueOf().toString(),"Value off");
		//Alert.show("date : "+dt.getDate().toString()+"\nmonth : "+Number(Number(dt.getMonth().toString())+1) +"\nYear : "+dt.getFullYear().toString());
		
			
		//if(Users.VerifyUser(this.txtUsername.text,this.txtPassword.text))
			this.dispatchEvent(new CustomEvent(CustomEvent.LOGIN_SUCCEED));
		//else
			//Alert.show("Invalid User Name or Password","User Authentication");
	}catch(err:Error){
		Logger.LogE(err);
	}
}